package com.agricultural.observer;

import com.agricultural.equipment.AgriculturalEquipment;

public class EquipmentMonitor implements EquipmentObserver {
    private String name;

    public EquipmentMonitor(String name) {
        this.name = name;
    }

    @Override
    public void update(AgriculturalEquipment equipment, String message) {
        System.out.println(name + " 监测到设备 " + equipment.getEquipmentId() + ": " + message);
    }
}    